<template>
  <div>
  <el-table
    ref="multipleTable"
    :data="tableData"
    tooltip-effect="dark"
    style="width: 100%"
    border
  >
    <el-table-column type="selection" width="55">
    </el-table-column>
    <el-table-column label="项目名称" width="70" prop="name">
    </el-table-column>
    <el-table-column prop="initDataNum" label="初始数据点" width="70">
    </el-table-column>
    <el-table-column prop="address" label="统计时间范围" width="200" show-overflow-tooltip>
      <template slot-scope="scope">{{ scope.row.date }}</template>
    </el-table-column>
    <el-table-column prop="level1MeanValue" label="水平1均值" show-overflow-tooltip>
    </el-table-column>
    <el-table-column prop="level1SD" label="水平1SD" show-overflow-tooltip>
    </el-table-column>
    <el-table-column prop="level1CV" label="水平1CV" show-overflow-tooltip>
    </el-table-column>
    <el-table-column prop="level2MeanValue" label="水平2均值" show-overflow-tooltip>
    </el-table-column>
    <el-table-column prop="level2SD" label="水平2SD" show-overflow-tooltip>
    </el-table-column>
    <el-table-column prop="level2CV" label="水平2CV" show-overflow-tooltip>
    </el-table-column>
  </el-table>
  <pagination v-show="total>0" :total="total" :page.sync="pageNum" :limit.sync="pageSize" />
  </div>
</template>

<script>
export default {
  name: 'setMeanValue',
  data() {
    return {
      tableData: [],
      multipleSelection: [],
      total: 2,
      pageNum: 1,
      pageSize: 20
    }
  },
  created() {
    this.handleLoadAndQuery()
  },
  methods: {
    handleLoadAndQuery() {
      let row1 = {
        name: 'CRP',
        initDataNum: 20,
        date: '2021/01/01-2021/06/01',
        level1MeanValue: 23.3,
        level1SD: 2.0,
        level1CV: 21,
        level2MeanValue: 33.0,
        level2SD: 2.0,
        level2CV: 12
      }
      let row2 = {
        name: 'SAA',
        initDataNum: 20,
        date: '2021/01/01-2021/06/01',
        level1MeanValue: 23.3,
        level1SD: 2.0,
        level1CV: 21,
        level2MeanValue: 33.0,
        level2SD: 2.0,
        level2CV: 12
      }
      this.tableData.push(row1, row2)
    }
  }
}
</script>
